#include<stdio.h>

int is_dui(int num);
int main(int argc, char *argv[])
{
	printf("%d\n", is_dui(123));
	printf("%d\n", is_dui(121));

	return 0;
}

int reverse_num(int num);
int reverse_num(int num){
	int res = 0;
	while(0 != num){
		res = res * 10 + num%10;
		num/=10;
	}
	return res;
}

int is_dui(int num){
	int res;
	
	res = reverse_num(num);

	return res == num;
}

